package com.gdth.utils;

import android.app.Activity;
import android.webkit.JavascriptInterface;
import android.widget.Toast;

/**
 * 定义注册的JavaScript事件
 * @author arvin
 *
 */
public class JavaScriptUtil {
	
	private Activity mActivity;
	
	public JavaScriptUtil()
	{
	}
	
	public void setActivity(Activity mActivity){
		this.mActivity = mActivity;
	}
	
	/**
	 * 测试弹出框
	 * @param message
	 */
	@JavascriptInterface
	public void toastMessage(String message) {
		Toast.makeText(mActivity, message, Toast.LENGTH_LONG).show();
	}
    
}
